package com.wps.www;

import java.util.Arrays;

public class Test2 {
    public static int func(int[] arr){
        Arrays.sort(arr);
        return arr[arr.length/2];
    }
    public static void main(String[] args) {
        int[] add={1,1,1,2,3,2,2,2};
        int num=func(add);
        System.out.println(num);
    }
}
